package springIOC.IOC_XML.config;

import org.apache.commons.dbutils.QueryRunner;
import org.springframework.context.annotation.*;

import javax.sql.DataSource;

@Configuration
@Import(DBConfig.class)
@ComponentScan("springIOC.IOC_XML")
@PropertySource("classpath:db.properties")
public class ConfigClass {

    @Bean(name = "queryRunner")
    @Scope("prototype")
    public QueryRunner createRunner(DataSource dataSource){
        return new QueryRunner(dataSource);
    }
}
